package examples.camera.action
{
	import examples.camera.command.CameraCustomCommand;
	import examples.camera.command.CameraResizeCommand;
	import examples.camera.helper.CameraHelper;

	import flash.display.BitmapData;

	import org.seasar.akabana.yui.command.events.CommandEvent;
	import org.seasar.akabana.yui.core.ns.handler;

	public class CameraAction
	{
		public var helper:CameraHelper;
		public var customCmd:CameraCustomCommand;

		handler function cameraUI_shot(bmpData:BitmapData):void {
			customCmd.start(bmpData);
		}

		handler function customCmd_complete(event:CommandEvent):void {
			helper.add(event.data as BitmapData);
		}

		handler function customCmd_error(event:CommandEvent):void {
			trace(1);
		}
	}
}